import request from '@/utils/request'

// 查询库存销毁列表
export function listDestroy(query) {
  return request({
    url: "/stock/destroy/list",
    method: "post",
    data: query,
  });
}

// 查询库存销毁详细
export function getDestroy(id) {
  return request({
    url: "/stock/destroy/" + id,
    method: "get",
  });
}

// 根据仓库ID、商品状态获取商品列表
export function getGoodsList(query) {
  return request({
    url: "/stock/destroy/getGoodsList",
    method: "post",
    data: query,
  });
}

// 新增库存销毁
export function addDestroy(data) {
  return request({
    url: "/stock/destroy/add",
    method: "post",
    data: data,
  });
}

// 修改库存销毁
export function updateDestroy(data) {
  return request({
    url: "/stock/destroy/update",
    method: "post",
    data: data,
  });
}

// 删除库存销毁
export function delDestroy(id) {
  return request({
    url: "/stock/destroy/delete/" + id,
    method: "post",
  });
}

// 审核库存销毁
export function auditDestroy(id) {
  return request({
    url: "/stock/destroy/auditDestroy/" + id,
    method: "post",
  });
}

// 撤销审核库存销毁
export function cancelAuditDestroy(data) {
  return request({
    url: "/stock/destroy/cancelAuditDestroy",
    method: "post",
    data: data,
  });
}

// 库存销毁预估费用
export function planDestroyAmount(data) {
  return request({
    url: "/stock/destroy/planDestroyAmount",
    method: "post",
    data: data,
  });
}

// ceo审批
export function ceoAuditDestroy(id) {
  return request({
    url: "/stock/destroy/ceoAuditDestroy/" + id,
    method: "post",
  });
}

// 库存销毁拒绝
export function closeDestroy(data) {
  return request({
    url: "/stock/destroy/closeDestroy",
    method: "post",
    data: data,
  });
}

// 财务审批
export function financeAuditDestroy(id) {
  return request({
    url: "/stock/destroy/financeAuditDestroy/" + id,
    method: "post",
  });
}

// 上传销毁凭证
export function uploadDestroyFiles(data) {
  return request({
    url: "/stock/destroy/uploadDestroyFiles",
    method: "post",
    data: data,
  });
}

// 财务确认
export function financeConfirmDestroy(id) {
  return request({
    url: "/stock/destroy/financeConfirmDestroy/" + id,
    method: "post",
  });
}
